package com.uzai.console.web.pyq;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.common.enums.DeviceTypeEnum;
import com.uzai.console.dto.pyq.GoodsGallery.GoodsGalleryQuery;
import com.uzai.console.dto.pyq.pyqmaterial.PyqMaterialQuery;
import com.uzai.console.service.qiniu.QiniuService;
import com.uzai.console.service.remoteapi.GoodsGalleryService;
import com.uzai.console.service.sysmaterial.SysMaterialService;
import com.uzai.console.vo.pyq.pyqmaterial.PyqMaterialVo;
import com.uzai.console.vo.remoteapi.goodsgallery.GoodsGallery;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 官方图库
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "官方图库",tags = "个人微信|朋友圈|官方图库")
@ApiSort(31)
@RestController
public class GoodsGalleryController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(GoodsGalleryController.class);

    @Autowired
    private GoodsGalleryService goodsGalleryService;
    @Autowired
    private QiniuService qiniuService;
    @Autowired
    private SysMaterialService sysMaterialService;

    @ApiOperation(value = "分页查询官方图库列表", notes = "分页查询官方图库列表", response = GoodsGallery.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/goodsGallery/findByPage")
    public Object findGoodsGalleryByPage(@RequestBody GoodsGalleryQuery goodsGalleryQuery){
        return goodsGalleryService.findGoodsGalleryByPage(goodsGalleryQuery);
    }

    @ApiOperation(value = "查询所有官方图库类型列表", notes = "查询所有官方图库类型列表", response = PyqMaterialVo.class)
    @ApiOperationSupport(order = 2)
    @PostMapping("/goodsGalleryType/findByList")
    public Object findGoodsGalleryTypeByList(){
        return goodsGalleryService.findGoodsGalleryTypeByList();
    }

}
